package com.exam.qc.contorller;

import com.exam.qc.client.QualityFeignClient;
import com.exam.qc.model.Quality;
import com.exam.qc.model.ReturnVo;
import com.exam.qc.service.QualityService;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/api/quality")
public class QualityController {

    @Resource
    private QualityFeignClient qualityFeignClient;


    /**
     * 质检操作接口
     * @param quality
     * @return
     */

    @RequestMapping(value = "/save",consumes = MediaType.APPLICATION_JSON_VALUE,produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public ReturnVo addQuality(@RequestBody Quality quality){
        return qualityFeignClient.saveQuality(quality);
    }



}
